import Http from './request';

const uploadUrl = "https://api.zhgylgl.com/api/uploadImg";
export const uploadImg = (file) => {
    const form = new FormData();
    form.append("file",file);
    return Http({
        url: uploadUrl,
        method: 'post',
        upload:true,
        data:form
    })
}

//编辑或发布行业动态
export const addNews = (data) => {
    return Http({
        url: '/addNews',
        method: 'post',
        data
    })
}


/**
 * 删除行业动态
 * @param id 自增id
 * **/
export const deleteNews = (data) => {
    return Http({
        url: '/deleteNews',
        method: 'post',
        data
    })
}


//获取行业动态列表
export const getNewsList = (data) => {
    return Http({
        url: '/getNewsList',
        method: 'get',
        data
    })
}

//获取运力信息列表
export const driverCarList = (data) => {
    return Http({
        url: '/driverCarList',
        method: 'get',
        data
    })
}


//获取运力信息列表
export const getSourceGoodsList = (data) => {
    return Http({
        url: '/getSourceGoodsList',
        method: 'get',
        data
    })
}
